#ifndef _PREPARE_WORKER_H
#define _PREPARE_WORKER_H

#include <nan.h>
#include "player.h"
extern "C"
{
#include "libavformat/avformat.h"
}
using namespace v8;

class PrepareWorker : public Nan::AsyncWorker
{
public:
  PrepareWorker(Local<String> url, Player *player, Nan::Callback *callback)
      : Nan::AsyncWorker(callback), mPlayer(player), mUrl(url)
  {
  }
  void Execute();
  void Destroy();


private:
  Player *mPlayer;
  Nan::Utf8String mUrl;
};

#endif